/*关卡*/

/*****************
 //  地图元素代号
 //
 //  空地：     0
 //  墙：       1
 //  目的：     2
 //  箱子：     3
 //  人：       4
 //
 //  人+目的：  6
 //  箱子+目的：5
 ******************/
var levels=[];

//第一关
levels[0]=[
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,1,1,1,0,0,0],
    [0,0,0,0,1,2,1,0,0,0],
    [0,1,1,1,1,0,1,0,0,0],
    [0,1,2,3,0,3,1,1,1,0],
    [0,1,1,1,4,3,0,2,1,0],
    [0,0,0,1,3,1,1,1,1,0],
    [0,0,0,1,2,1,0,0,0,0],
    [0,0,0,1,1,1,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0]
];

//第二关
levels[1]=[
    [1,1,1,1,1,0,0,0,0,0],
    [1,0,0,0,1,0,0,0,0,0],
    [1,0,3,0,1,0,1,1,1,0],
    [1,0,3,4,1,0,1,2,1,0],
    [1,1,1,3,1,1,1,2,1,0],
    [0,1,1,0,0,0,0,2,1,0],
    [0,1,0,0,0,1,0,0,1,0],
    [0,1,0,0,0,1,1,1,1,0],
    [0,1,1,1,1,1,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0]
];

//第三关
levels[2]=[
    [0,0,0,0,0,0,0,0,0,0],
    [0,1,1,1,1,1,1,1,0,0],
    [0,1,0,0,0,0,0,1,1,1],
    [1,1,3,1,1,1,0,0,0,1],
    [1,0,0,4,3,0,0,3,0,1],
    [1,0,2,2,1,0,3,0,1,1],
    [1,1,2,2,1,0,0,0,1,0],
    [0,1,1,1,1,1,1,1,1,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0]
];

//第四关
levels[3]=[
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,1,1,1,1,0,0,0],
    [0,0,1,1,0,0,1,0,0,0],
    [0,0,1,0,0,3,1,0,0,0],
    [0,0,1,1,0,0,1,1,0,0],
    [0,0,1,1,3,4,0,1,0,0],
    [0,0,1,2,3,3,0,1,0,0],
    [0,0,1,2,2,5,2,1,0,0],
    [0,0,1,1,1,1,1,1,0,0],
    [0,0,0,0,0,0,0,0,0,0]
];

//第五关
levels[4]=[
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,1,1,1,1,1,0,0,0],
    [0,0,1,0,4,1,1,1,0,0],
    [0,0,1,0,3,0,0,1,0,0],
    [0,1,1,1,0,1,0,1,1,0],
    [0,1,2,1,0,1,0,0,1,0],
    [0,1,2,3,0,0,1,0,1,0],
    [0,1,2,0,0,0,3,0,1,0],
    [0,1,1,1,1,1,1,1,1,0],
    [0,0,0,0,0,0,0,0,0,0]
];

//第六关
levels[5]=[
    [0,0,0,1,1,1,1,1,1,1,0,0,0],
    [1,1,1,1,0,0,0,0,0,1,0,0,0],
    [1,0,0,0,2,1,1,1,0,1,0,0,0],
    [1,0,1,0,1,0,0,0,0,1,1,0,0],
    [1,0,1,0,3,0,3,1,2,0,1,0,0],
    [1,0,1,0,0,5,0,0,1,0,1,0,0],
    [1,0,2,1,3,0,3,0,1,0,1,0,0],
    [1,1,0,0,0,0,1,0,1,0,1,1,1],
    [0,1,0,1,1,1,2,0,0,0,0,4,1],
    [0,1,0,0,0,0,0,1,1,0,0,0,1],
    [0,1,1,1,1,1,1,1,1,1,1,1,1]
];

//第七关
levels[6]=[
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,1,1,1,1,1,1,1],
    [0,0,1,1,0,0,1,0,4,1],
    [0,0,1,0,0,0,1,3,0,1],
    [0,0,1,3,0,0,3,0,0,1],
    [0,0,1,0,3,1,1,0,0,1],
    [1,1,1,0,3,0,1,0,1,1],
    [1,2,2,2,2,2,0,0,1,0],
    [1,1,1,1,1,1,1,1,1,0],
    [0,0,0,0,0,0,0,0,0,0]
];

//第八关
levels[7]=[
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,1,1,1,1,1,1,0],
    [0,1,1,1,0,0,0,0,1,0],
    [1,1,2,0,3,1,1,0,1,1],
    [1,2,2,3,0,3,0,0,4,1],
    [1,2,2,0,3,0,3,0,1,1],
    [1,1,1,1,1,1,0,0,1,0],
    [0,0,0,0,0,1,1,1,1,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0]
];

//第九关
levels[8]=[
    [0,1,1,1,1,1,1,1,1,1,0],
    [0,1,0,0,1,1,0,0,0,1,0],
    [0,1,0,0,0,3,0,0,0,1,0],
    [0,1,3,0,1,1,1,0,3,1,0],
    [0,1,0,1,2,2,2,1,0,1,0],
    [1,1,0,1,2,2,2,1,0,1,1],
    [1,0,3,0,0,3,0,0,3,0,1],
    [1,0,0,0,0,0,1,0,0,4,1],
    [1,1,1,1,1,1,1,1,1,1,1],
    [0,0,0,0,0,0,0,0,0,0,0]
];

//第十关
levels[9]=[
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0],
    [0,0,0,1,1,1,1,1,1,0],
    [0,0,0,1,0,0,0,0,1,0],
    [0,1,1,1,3,3,3,0,1,0],
    [0,1,4,0,3,2,2,0,1,0],
    [0,1,0,3,2,2,2,1,1,0],
    [0,1,1,1,1,0,0,1,0,0],
    [0,0,0,0,1,1,1,1,0,0],
    [0,0,0,0,0,0,0,0,0,0]
];